<template>
	<view class="flex" style="flex-wrap: wrap;">
		<indexModule v-for="(item,index) in roles" class="module" icon="icon-ic_history" :url="item.url" :title="item.title"></indexModule>
		<!-- <indexModule class="module" @clickModule="toNotSubtract"  icon="icon-ic_history" title="待核减管理"></indexModule>
		<indexModule class="module" @clickModule="toSubtract"  icon="icon-ic_history" title="已核减管理"></indexModule> -->
	</view>
</template>

<script>
	import indexModule from "@/components/ui/page/index-module.vue";
	export default {
		components: {
			indexModule
		},
		data() {
			return {
				roles: [{
					title: '待核减管理',
					url: './notSubtract/notSubtract',
					weight: 1
				}, {
					title: '已核减管理',
					url: './subtract/subtract',
					weight: 2
				}]
			}
		},
		methods: {
			toSubtract() {
				this.$utiltg.navigateTo("/pages/index/dynamic/subtract/subtract")
			},
			toNotSubtract() {
				this.$utiltg.navigateTo("/pages/index/dynamic/notSubtract/notSubtract")
			}
		}
	}
</script>

<style>
	.module {
		width: 50%;
	}
</style>
